from elasticsearch import Elasticsearch

es_index = 'ipabstract'
es_type = 'patent'

es = Elasticsearch(hosts=[{'host': "192.168.1.167", 'port': "9200"}])

query = {'query': {'match_all': {}}}
es.delete_by_query(index=es_index, body=query, doc_type=es_type)
